-module('ex_7.10_plain_characters').

-include_lib("eunit/include/eunit.hrl").

-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").

single_test_() ->
    ?_assertMatch(
      {yamerl_parser,
        {file,?FILENAME},
        [],
        <<>>,
        218,
        true,
        [],
        0,
        219,
        13,
        1,
        false,
        12,
        31,
        utf8,
        false,
        undefined,
        _,
        _,
        [],
        {bcoll,root,0,-1,1,1,-1,1,1},
        false,
        false,
        false,
        [{impl_key,false,false,undefined,undefined,1,1}],
        false,
        false,
        _,
        [],
        0,
        30,
        29,
        undefined,
        undefined,
        _,
        false,
        [],
        [
          {yamerl_stream_end,12,31},
          {yamerl_doc_end,12,31},
          {yamerl_collection_end,12,31,block,sequence},
          {yamerl_collection_end,12,30,flow,sequence},
          {yamerl_scalar,12,3,
            {yamerl_tag,12,3,{non_specific,"?"}},
            flow,plain,"http://example.com/foo#bar"},
          {yamerl_sequence_entry,12,3},
          {yamerl_scalar,11,3,
            {yamerl_tag,11,3,{non_specific,"?"}},
            flow,plain,"-123"},
          {yamerl_sequence_entry,11,3},
          {yamerl_scalar,10,3,
            {yamerl_tag,10,3,{non_specific,"!"}},
            flow,double_quoted,"Up, up and away!"},
          {yamerl_sequence_entry,10,3},
          {yamerl_scalar,9,3,
            {yamerl_tag,9,3,{non_specific,"!"}},
            flow,double_quoted,": - ()"},
          {yamerl_sequence_entry,9,3},
          {yamerl_scalar,8,5,
            {yamerl_tag,8,5,{non_specific,"?"}},
            flow,plain,"::vector"},
          {yamerl_sequence_entry,8,5},
          {yamerl_collection_start,8,3,
            {yamerl_tag,8,3,{non_specific,"?"}},
            flow,sequence},
          {yamerl_sequence_entry,8,1},
          {yamerl_scalar,6,3,
            {yamerl_tag,6,3,{non_specific,"?"}},
            flow,plain,"http://example.com/foo#bar"},
          {yamerl_sequence_entry,6,1},
          {yamerl_scalar,5,3,
            {yamerl_tag,5,3,{non_specific,"?"}},
            flow,plain,"-123"},
          {yamerl_sequence_entry,5,1},
          {yamerl_scalar,4,3,
            {yamerl_tag,4,3,{non_specific,"?"}},
            flow,plain,"Up, up, and away!"},
          {yamerl_sequence_entry,4,1},
          {yamerl_scalar,3,3,
            {yamerl_tag,3,3,{non_specific,"!"}},
            flow,double_quoted,": - ()"},
          {yamerl_sequence_entry,3,1},
          {yamerl_scalar,2,3,
            {yamerl_tag,2,3,{non_specific,"?"}},
            flow,plain,"::vector"},
          {yamerl_sequence_entry,2,1},
          {yamerl_collection_start,2,1,
            {yamerl_tag,2,1,{non_specific,"?"}},
            block,sequence},
          {yamerl_doc_start,2,1,{1,2},_},
          {yamerl_stream_start,1,1,utf8}
        ]
      },
      yamerl_parser:file(?FILENAME)
    ).
